﻿//=============================================================== 
// filename :ICompareStation  
// created by herb at 2018/2/9 17:29:45  
// personal homepage:http://www.xiaoboke.net  
//===============================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SubwayHelper
{
    public class StationEquality : IEqualityComparer<Station>
    {
        public bool Equals(Station x, Station y)
        {
            if (x == null || y == null) return false;
            return x.Name.IsSame(y.Name);
        }

        public int GetHashCode(Station obj)
        {
            return obj.ToString().GetHashCode();
        }
    }
}
